<div class="center">
	<a class="button preloader" href="<? echo redirect_str(PAGE_ADMIN_PLAYER); ?>">PŘIDAT HRÁČE</a><br /><br />
</div>
  
<table class="centered small-table">
      <tr>
        <th>jméno</th>
        <th>post</th>
        <th>věk</th>
        <th>svátek</th>
        <th>akce</th>
      </tr>
      
      <?
      $idx = 0;
      $query = getPlayers();
      while($fetch = MySQL_Fetch_Array($query)){
        $id = $fetch["id_hrace"];
        $name = $fetch["jmeno"];
        $surname = $fetch["prijmeni"];
        $age = $fetch["vek"];
        $svatek = $fetch["svatek"];
        $inteam = $fetch["aktivni"];
        $post = $fetch["post"];
        
        if($inteam == 0) echo "<tr class='disabled'>";
        else if($idx % 2 == 0) { echo "<tr class='second'>"; }
        else echo "<tr>";
        echo "<td class='lefted'>$surname $name</td>";
        echo "<td>$post</td>";
        echo "<td>$age</td>";
        echo "<td>$svatek</td>";
        echo "<td><a class='preloader' href='".redirect_str(PAGE_ADMIN_PLAYER).add_par("id_hrac=".$id)."'><img class='icon-btn' src='./img/icons/edit.png'></a>
              <a class='preloader' href='".redirect_str(PAGE_ADMIN_PLAYERS).action(ACTION_DELETE_PLAYER).add_par("id_hrac=".$id)."'><img class='icon-btn' src='./img/icons/delete.png'></a></td>";
        echo "</tr>";
        $idx ++;
      }
      ?>
</table>
